//
//  AboutViewController.m
//  远方
//
//  Created by 1564335 on 15-6-8.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "AboutViewController.h"

@interface AboutViewController ()

@end

@implementation AboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor colorWithRed:227/255.0 green:233/255.0 blue:240/255.0 alpha:1];
    
    UIImage *icon = [UIImage imageNamed:@"iconfont_return"];
    icon = [icon imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:icon style:UIBarButtonItemStyleDone target:self action:@selector(getBack)];
    
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(10, 20, 200, 40)];
    label1.text = @"远方";
    UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(10, 60, 200, 40)];
    label2.text = @"版本信息: 1.0";
    UILabel *label3 = [[UILabel alloc] initWithFrame:CGRectMake(10, 100, self.view.frame.size.width - 20, 40)];
    label3.text = @"‘远方’是一款图文并茂的旅行地攻略软件，包含了旅行游记、旅行地专题、旅行地攻略等旅行相关信息，能够满足大家对于选择旅行地的不同需求。为热爱旅行的您提供更多的便捷导航。远方的成长离不开您的关注与支持，我们希望能够得到您的意见及建议。\n申明：本软件不涉及任何商业运营，如有侵权，请及时联系我们。\n联系方式：yan_1564335@126.com\n开发者：胡岩／陆明／周慧敏";
    label3.font = [UIFont systemFontOfSize:20];
    label3.numberOfLines = 0;
    [label3 sizeToFit];

    [self.view addSubview:label1];
    [self.view addSubview:label2];
    [self.view addSubview:label3];
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];
    paragraphStyle.lineSpacing = 8;
    NSDictionary *attributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:15], NSParagraphStyleAttributeName:paragraphStyle};
    label3.attributedText = [[NSAttributedString alloc]initWithString:label3.text attributes:attributes];
    
}

- (void)getBack
{
//    self.tabBarController.tabBar.hidden = NO;
//    self.tabBarController.tabBar.translucent = NO;
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
